package exception;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class TryCatchDemo01 {
    public static void main(String[] args) throws IOException {
        try {
            FileOutputStream fos = new FileOutputStream("./2047/fos.txt", true);
            fos.write(100);
            fos.close();
        }catch (FileNotFoundException e1){//先子类异常，再父类异常
            e1.printStackTrace();
        }catch (IOException e2){
            e2.printStackTrace();
        }
    }
}
